package org.flexthinker.binding.validation
{
    import mx.events.ValidationResultEvent;

    public interface ValidationResults
    {
        /**
         * Returns <code>true</code> of there are any validation messages of
         * <code>Severity.ERROR</code>.
         */
        function getHasErrors():Boolean;

        /**
         * Returns <code>true</code> of there are any validation messages of
         * <code>Severity.WARNING</code>.
         */
        function getHasWarnings():Boolean;

        /**
         * Returns <code>true</code> of there are any validation messages of
         * <code>Severity.INFO</code>.
         */
        function getHasInfo():Boolean;

        /**
         * Returns the total number of validation messages.
         */
        function getMessageCount():int;

        /**
         * Returns the total number of validation messages of the specified
         * Severity( SeverityEnum )
         */
        function getMessageCountForSeverity( severity:String ):int;

        /**
         * Returns the total number of validation messages that apply to the
         * specified property name.
         */
        function getMessageCountForProperty( propertyName:String):int;

        /**
         * Returns a set holding all of the validation messages.
         */
        function getMessages():Vector.<ValidationResultEvent>;

        /**
         * Returns a set holding all of the validation messages of the specified
         * Severity.
         */
        function getMessagesForSeverity( severity:String):Vector.<ValidationResultEvent>;
    
        /**
         * Returns a set holding all of the validation messages that apply to the
         * specified property name.
         */
        function getMessagesForProperty(propertyName:String):Vector.<ValidationResultEvent>;
    }
}